package com.hougong.im.common;

/**
 * 业务码
 */
public enum  GlobalCode {
    Read_Or_Unread(0x1111,0x01,"终端已读"),
    Server_Generic_Response(0x8001,0x02,"中心通用应答"),
    Client_Generic(0x0001,0x01,"终端通用应答"),
    Client_HeartBeat(0x0002,0x01,"终端心跳"),
    Client_Login(0x0003,0x01,"终端登录"),
    Login_Response(0x0033,0x02,"中心返回的登录响应"),
    Other_Apply_Add_You_Notice(0x0005,0x03,"对方申请添加你"),
    Other_Add_Or_Reject_Notice(0x0007,0x03,"对方添加/拒绝 你为好友"),
    Friend_Message_Notice(0x8888,0x03,"好友消息notice"),
    Group_Message_Notice(0x9999,0x03,"群组消息notice"),
    Friend_Image_Message_Notice(0x8887,0x03,"图片消息"),
    Friend_OnLine_Status_Notice(0x8889,0x03,"好友上线下线通知"),
    Apply_Audio_Chat_Notice(0x9000,0x03,"申请语音通话"),
    Accept_Audio_Chat_Notice(0x9001,0x03,"接受语音通话"),
    Close_Audio_Chat_Notice(0x9002,0x03,"关闭语音通话")
    ;
     private short bizCode;
     private byte msgCode;
     private String remark;

    GlobalCode(short bizCode, byte msgCode, String remark) {
        this.bizCode = bizCode;
        this.msgCode = msgCode;
        this.remark = remark;
    }

    GlobalCode(int i, int i1, String remark) {
        this.bizCode= (short) i;
        this.msgCode= (byte) i1;
        this.remark=remark;
    }

    public short getBizCode() {
        return bizCode;
    }

    public static GlobalCode find(short  bizCode) {
        for (GlobalCode mccEnum : GlobalCode.values()) {
            if (mccEnum.getBizCode()==bizCode) {
                return mccEnum;
            }
        }
        return null;
    }

    public void setBizCode(short bizCode) {
        this.bizCode = bizCode;
    }

    public byte getMsgCode() {
        return msgCode;
    }

    public void setMsgCode(byte msgCode) {
        this.msgCode = msgCode;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
